From: Carlos Garnacho Date: Mon, 1 Apr 2019 16:06:49 +0000 (+0200) Subject: shell: Fallback on ISO 8601 datetime string for screenshot date info X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~871^2^2~6 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=1b5e91e4b3f6f6f035c768865d220b36f945c616;p=gnome-shell.git shell: Fallback on ISO 8601 datetime string for screenshot date info If the locale doesn't honor strftime()'s %c argument, we would end up feeding NULLs into GdkPixbuf tagging. Fallback to a sensible (although not nicely localized) datetime string. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1017 --- diff --git a/src/shell-screenshot.c b/src/shell-screenshot.c index 61fdc1d1e..c9743f42d 100644 --- a/src/shell-screenshot.c +++ b/src/shell-screenshot.c @@ -202,6 +202,9 @@ write_screenshot_thread (GTask *result, cairo_image_surface_get_height (priv->image)); creation_time = g_date_time_format (priv->datetime, "%c"); + if (!creation_time) + creation_time = g_date_time_format (priv->datetime, "%FT%T%z"); + if (gdk_pixbuf_save_to_stream (pixbuf, stream, "png", NULL, NULL, "tEXt::Software", "gnome-screenshot", "tEXt::Creation Time", creation_time,